/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package syslivros;

import java.awt.event.KeyEvent;

/**
 *
 * @author Rafael
 */
public class Consultar extends javax.swing.JFrame {

    /**
     * Creates new form Consultar
     */
    public Consultar() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        btnConsultarCursos = new javax.swing.JButton();
        btnConsultarBase = new javax.swing.JButton();
        btnConsultarEstoque_Base = new javax.swing.JButton();
        btnVoltar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Consultar");

        btnConsultarCursos.setText("Enviadas nos cursos");
        btnConsultarCursos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConsultarCursosActionPerformed(evt);
            }
        });
        btnConsultarCursos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                btnConsultarCursosKeyPressed(evt);
            }
        });

        btnConsultarBase.setText("Apostilas recebidas base");
        btnConsultarBase.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConsultarBaseActionPerformed(evt);
            }
        });
        btnConsultarBase.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                btnConsultarBaseKeyPressed(evt);
            }
        });

        btnConsultarEstoque_Base.setText("Estoque em Base");
        btnConsultarEstoque_Base.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConsultarEstoque_BaseActionPerformed(evt);
            }
        });
        btnConsultarEstoque_Base.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                btnConsultarEstoque_BaseKeyPressed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(btnConsultarCursos)
                .addGap(18, 18, 18)
                .addComponent(btnConsultarEstoque_Base)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnConsultarBase)
                .addContainerGap(28, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnConsultarCursos)
                    .addComponent(btnConsultarBase)
                    .addComponent(btnConsultarEstoque_Base))
                .addContainerGap(40, Short.MAX_VALUE))
        );

        btnVoltar.setText("Voltar");
        btnVoltar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVoltarActionPerformed(evt);
            }
        });
        btnVoltar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                btnVoltarKeyPressed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(379, 379, 379)
                        .addComponent(btnVoltar))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(79, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(60, 60, 60)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE)
                .addComponent(btnVoltar)
                .addGap(33, 33, 33))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-556)/2, (screenSize.height-338)/2, 556, 338);
    }// </editor-fold>//GEN-END:initComponents

    private void btnConsultarCursosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConsultarCursosActionPerformed
new Consulta_Cursos().setVisible(true);
this.dispose();
    }//GEN-LAST:event_btnConsultarCursosActionPerformed

    private void btnConsultarCursosKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_btnConsultarCursosKeyPressed
if(evt.getKeyCode()==KeyEvent.VK_ENTER){
btnConsultarCursosActionPerformed(null);
}
    }//GEN-LAST:event_btnConsultarCursosKeyPressed

    private void btnConsultarBaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConsultarBaseActionPerformed
new Consultar_Base().setVisible(true);
this.dispose();
    }//GEN-LAST:event_btnConsultarBaseActionPerformed

    private void btnConsultarBaseKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_btnConsultarBaseKeyPressed
if(evt.getKeyCode()==KeyEvent.VK_ENTER){
btnConsultarBaseActionPerformed(null);
}
    }//GEN-LAST:event_btnConsultarBaseKeyPressed

    private void btnVoltarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVoltarActionPerformed
new Principal().setVisible(true);
this.dispose();
    }//GEN-LAST:event_btnVoltarActionPerformed

    private void btnVoltarKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_btnVoltarKeyPressed
if(evt.getKeyCode()==KeyEvent.VK_ENTER){
btnVoltarActionPerformed(null);
}
    }//GEN-LAST:event_btnVoltarKeyPressed

    private void btnConsultarEstoque_BaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConsultarEstoque_BaseActionPerformed
new Consultar_EstoqueBase().setVisible(true);
this.dispose();
    }//GEN-LAST:event_btnConsultarEstoque_BaseActionPerformed

    private void btnConsultarEstoque_BaseKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_btnConsultarEstoque_BaseKeyPressed
    if(evt.getKeyCode()==KeyEvent.VK_ENTER){
    btnConsultarBaseActionPerformed(null);
    }
    }//GEN-LAST:event_btnConsultarEstoque_BaseKeyPressed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Consultar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Consultar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Consultar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Consultar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Consultar().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnConsultarBase;
    private javax.swing.JButton btnConsultarCursos;
    private javax.swing.JButton btnConsultarEstoque_Base;
    private javax.swing.JButton btnVoltar;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
}
